
layui.define(['element','Zarea'],function(exports) {
	var  Zarea = layui.Zarea;
	$(".button").click(function() {
		if($(".buttonZ").html() == "展开") {
			$(".jian").css("background", "url(/ceca_two/img/shouqi.png)");
			$(".buttonZ").html("收起");
			$(".descriptionThis pre").removeClass('overflow');
		} else if($(".buttonZ").html() == "收起") {
			$(".jian").css("background", "url(/ceca_two/img/zhankai.png)");
			$(".buttonZ").html("展开");
			$(".descriptionThis pre").addClass('overflow');
		}

	})
	$("#catalogTree > li").click(function(){
		$(this).toggleClass("layui-nav-itemed");
	});
	$(".layui-nav-child dd").click(function(){
		var $a =$(this).children("a"); 
		$(this).parents(".layui-nav-item")
				.children("a")
				    .attr("data-fieldId",$a.attr("data-fieldId"))
				    .text($a.text());
		if($("#fieldParant").next().length != 0)$("#fieldParant").nextAll().remove()
		$("#fieldParant").after("<li>&gt;</li><li><a data-fieldId="+$a.attr("data-fieldId")+" href=\"javascript:;\">"+$a.text()+"</a></li>");
		obj.fieldId=$a.attr("data-fieldId");
		getList(obj);
	});
	
	$(".layui-nav-item").click(function() {
		if($(this).has(".layui-nav-itemed")) {
			$(this).siblings().removeClass('layui-nav-itemed');
			return false;
		}
	})
	$(".table tbody tr:nth-child(odd)").css("background", "#ffffff");
	$(".table tbody tr:nth-child(even)").css("background", "#f9f9f9");
	$(".table tbody tr td:nth-child(3)").css("color", "#999999");
	$(".table tbody tr td:nth-child(8)").css("color", "#999999");
	$(".table tbody tr td:nth-child(4)").css("color", "#0032d2");
	$(".table tbody tr td:nth-child(5)").css("color", "#ff3030");
	$(".table tbody tr td:nth-child(6)").css("color", "#ff3030");
	$(".picture .pictureI").mouseenter(function() {
		$(this).next().css("display", "block");
		return false;
	})
	$(".picture").mouseleave(function() {
		$(this).find('.echartsPic').css("display", "none");
		return false;
	})
	var list={
		data:{},
		reptain:function reptain(data){

			},
		childLoop:function childLoop(fieldParantId){
				var html = "<dl class=\"layui-nav-child\">";
				$.each(list.data, function(index,data) {
					if(data.catalogParentId == fieldParantId )html+="<dd><a  data-catalogId="+data.catalogId+"  href=\"javascript:;\">"+data.catalogName+"</a></dd>";
				});
				html+="</dl>";
				return html;
			}
		
	}
	
	exports('GovernmentInformation', list); //注意，这里是模块输出的核心，模块名必须和use时的模块名一致
});